﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using COFE.Core.Plugin;
using COFE.Core;
using COFE.Core.Profile;
using System.ComponentModel.Composition;

namespace COFE.Web.Plugin
{
    [Export(typeof(IPluginUser))]
    public class COFEWSPluginUser : PluginUserBase
    {
        public COFEWSPluginUser()
            : base(PluginBase.Priority_COFEWS)
        {
                
            
        }

        public override void Apply(IPluginManager manager)
        {
            if (!(COFEShared.UserProfileManager is IUserProfileManager2))
                throw new NotSupportedException();

            COFEShared.UserProfileManager = 
                new WSUserProfileManager(COFEShared.UserProfileManager as IUserProfileManager2);
        }
    }
}
